-
Notifications
You must be signed in to change notification settings - Fork 1
Adding initial version of audit log v2 html pattern library #180
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Adding initial version of audit log v2 html pattern library #180
Conversation
… into feature/audit-log-v2-pattern-library
… into feature/audit-log-v2-pattern-library
…can now be version controlled with each other. The CMP figma can also be added into a sibling folder called "CMP".
|
Why is there an empty |
OlivierChirouze
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
A couple of issues that prevent me from approving:
- disturbing figma directory
- usage of Javascript instead of Typescript
- empty
ok-ui.js file
paf-mvp-figma/audit/README.md
Outdated
|
|
||
| ## About the authors | ||
|
|
||
| [Dot Creative](https://dotcreative.hu) is a Digital Agency. Our main profile is |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm confused about this whole directory: what is its purpose? why a documentation directory in this implementation repo? I'm not sure why there is such a need for such README, but if there is, I think it should be in (https://github.com/prebid/addressability-framework)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The .fig file is the one that contains all the design work which is the input into the pattern library. For those working on the design this file is important to be able to apply updates and understand the work. It is not relevant to developers working on code, but is relevant for the overall project. It could be moved to addressability-framework if that is the better repository. Please let me know once you've considered the .fig file.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, I think this would be better placed in the other repository, because it is focused on specs and design, while this one is focused on implementation.
WDYT?
| import Details from './Details'; | ||
| import { BlockedImage } from './Icons'; | ||
|
|
||
| const Image = (args = {}) => { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why not using Typescript? (https://storybook.js.org/docs/react/configure/typescript)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The pattern library is produced to be final implementation agnostic. These will be moved to typescript when the HTML and CSS is transferred for the reference implementation. Other optimisations will also be applied to reduce duplications, etc. The advantage of the approach is that someone could take this HTML and JS and deploy it in PHP (or another language) without any issues.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks.
I'm sorry, I don't understand this sentence:
These will be moved to typescript when the HTML and CSS is transferred for the reference implementation
Could you please develop? What do you mean by "transferred for the reference implementation"?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
My understanding is that it's pretty common to define components and stories in typescript, isn't it?
https://storybook.js.org/docs/react/get-started/whats-a-story
… into feature/audit-log-v2-pattern-library
| import Details from './Details'; | ||
| import { BlockedImage } from './Icons'; | ||
|
|
||
| const Image = (args = {}) => { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks.
I'm sorry, I don't understand this sentence:
These will be moved to typescript when the HTML and CSS is transferred for the reference implementation
Could you please develop? What do you mean by "transferred for the reference implementation"?
paf-mvp-figma/audit/README.md
Outdated
|
|
||
| ## About the authors | ||
|
|
||
| [Dot Creative](https://dotcreative.hu) is a Digital Agency. Our main profile is |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, I think this would be better placed in the other repository, because it is focused on specs and design, while this one is focused on implementation.
WDYT?
OlivierChirouze
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Still waiting for more details on the JS versus TS.
|
PR for the UI design element is now here. |
The HTML Pattern Library from Storybook is designed to be implemented in any environment and might not include Typescript. For example a PHP server serving static HTML and JS only. The Typescript conversion for this concrete implementation is done, if warranted, when the pattern library is used in the Typescript module. See the use of Popper in the CMP module. |
|
Let me rephrase with some more basic English 😅 If that's a correct interpretation, then I get your point, although:
Finally, this is nit picking but I think the components should be stored in a different directory than the stories, or at least the parent one should not be called "stories" as this can be misleading (at least I was confused). |
|
As with many things there are different ways of doing the same thing. In this case we've used JS in the Storybook pattern libraries. Happy for others to refactor to TS in the future if they wish. |
| "core-js": "^3.21.0", | ||
| "css-loader": "^5.2.7", | ||
| "sass": "^1.49.9", | ||
| "sass-loader": "^10.1.1", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I had to install @mdx-js/react to be able to start Storybook.
Isn't missing from the dependencies?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Also, NIT but the package-lock.json file seems to have been generated with a version of node that is too old: it should be in version 2 for node 17 (which is the version used on the repo, see .nvmrc)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Re: Package - We've not had to install additional packages. I guess there is no harm in adding it but I can't recreate the issue.
Re: Version - We tend not to use the odd versions of Node because they aren’t the stable releases. We’ve opted for v16 as although v18 was recently released it doesn’t appear to be immediately compatible with our version of Storybook.
(cherry picked from commit 6d34b18)
|
Re: "Transfer to the reference implementation" |
OlivierChirouze
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Approving after our sync last week.
Please note that we consider the migration of Storybook components and stories from Javascript to Typescript is a must-have, but should be done in another PR.
Added new self contained directory named ./paf-mvp-pattern-library-audit for V2 audit log HTML pattern library in Storybook.
Minor change to audit UI model.